package com.xuecheng.content.api;

import com.xuecheng.commons.model.vo.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient("xc-content-service")
public interface ContentClient {


    // 根据id查询课程发布
    @GetMapping("/coursePub/{id}")
    public ResponseResult<CoursePubVo> findById(@PathVariable("id") Long id);


    // 根据id查询课程计划（大纲）
    @GetMapping("/teachplan/{teachplanId}")
    public ResponseResult<TeachplanVo> findTeachplanById(@PathVariable("teachplanId")Long teachplanId);

    @GetMapping("/course/{courseBaseId}")
    public ResponseResult<CourseBaseVo> findCourseBaseById(@PathVariable("courseBaseId") Long courseBaseId);


    /*@GetMapping("/teachpian/media/{courseId}")
    public ResponseResult<TeachplanMediasVo> teachplanMedia(@PathVariable("courseId") Long courseId);*/

    /*// feign查询课程计划
    @GetMapping("/teachplan/garde/{courseId}")
    public ResponseResult<List<TeachplanVo>> treeNodes3(@PathVariable("courseId") Long courseId);*/

    // 查询课程计划
    @GetMapping("/teachplan/{courseId}/tree-nodes")
    public ResponseResult<TeachplanVo> treeNodes(@PathVariable("courseId") Long courseId);
}
